home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 March / CHIP Mart 1997.iso / SurfCam / SURFCAM.Z / GENERIC.L2 < prev    next >
Encoding:
Text File  |  1996-04-01  |  4.4 KB  |  174 lines

  1. name Generic lathe
  2.  
  3. % 00
  4. ! 00
  5. O 4
  6. N 3
  7. G 2
  8. X ->3.>4
  9. x ->3.>4 X
  10. Z ->3.>4
  11. D 2
  12. I ->3.>4
  13. K ->3.>4
  14. U ->3.>4
  15. W ->3.>4
  16. P ->3.>4
  17. A 60 P
  18. Q ->3.>4
  19. q ->3.>4 Q
  20. R ->3.>4
  21. F >3.>3
  22. T 2
  23. t 2
  24. S >4
  25. M 2
  26.  
  27. ModalLetters X Z F                    # List of letters that are modal    
  28.  
  29. ModalGs 0 1 2 3 73 76 80 81 82 83 84 85  # List of g codes that are modal    
  30.  
  31. Sequence#s N 0 1 1                    # Char, freq, incr & start          
  32. First#? N                             # Y or N  'Output 1st sequence no.  
  33. Last#? N                              # Y or N  'Output last sequence no. 
  34.  
  35. Comment ( )                           # Begin End comment char.           
  36.  
  37. HCode Z                               # X or X U  'Horizontal char.       
  38. VCode X                               # Y or Y V  'Vertical char.         
  39. FeedCode F                            # Feed rate char.                   
  40.  
  41. Spindle 3 4 5                         # Cw, ccw & stop m codes            
  42. Coolant 8 9 7                         # On, Off & Mist m codes            
  43. DComp 41 42 40                        # Left, Right & Cancel m codes      
  44. LComp 43 49                           # On & Off codes                    
  45.  
  46. SpeedType G 97 96                     # CSS and RPM g codes               
  47. FeedType G 95 94                      # IPR & IPM g codes                 
  48.  
  49. ByDiameter? Y                         # Y or N  'Output X val. by diameter
  50. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  51. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  52. CtrCode R                             # I J or R or I J K L               
  53.  
  54. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  55. Inch/MM 20 21                         # Inch & Metric g codes             
  56.  
  57. Spaces? Y                             # Y or N  'Spaces between words     
  58. Incremental? N                        # Y or N  'Inc or abs output        
  59.  
  60. Feed G1                               # Linear move                       
  61. Rapid G0                              # Rapid positioning word            
  62. Cw G2                                 # Circular move clockwise           
  63. Ccw G3                                # Circular move counter clockwise   
  64.  
  65. RevSigns X x                          # List of letters to reverse signs  
  66.  
  67. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  68.  
  69. AutoThread                            # Automatic thread canned cycle     
  70. G76 A[TParams] Q[VBite] R0
  71. G76 X[V] Z[H] R[StartAng] P[Depth] q[Peck1] F[Frate]
  72. end
  73.  
  74. Drill                                 # Drilling canned/manual cycle      
  75. G74 Z[Depth] F[Frate]
  76. end
  77.  
  78. Peck                                  # Pecking canned/manual cycle       
  79. G74 Z[Depth] K[VBite] F[Frate]
  80. end
  81.  
  82. Ream                                  # Reaming canned/manual cycle       
  83. G1 Z[H] F[FRate]
  84. G1 Z[VClear]
  85. end
  86.  
  87. Bore                                  # Boring canned/manual cycle        
  88. G1 Z[H] F[FRate]
  89. G1 Z[VClear]
  90. end
  91.  
  92. Back                                  # Back boring canned/manual cycle   
  93. G1 Z[H] F[FRate]
  94. G1 Z[VClear]
  95. end
  96.  
  97. Cancel                                # Cancel a canned/manual cycle      
  98. G80
  99. end
  100.  
  101. StartCode                             # Start of the program              
  102. %0
  103. !0 O[Program#]
  104. end
  105.  
  106. 1stToolChange                         # First tool change                 
  107. G50 x[ToolH] Z[ToolV]
  108. G0 T[Tool] t[Tool] M42
  109. G[SpeedType] S[Speed] M[Direct]
  110. X[V] Z[H] M[Cool]
  111. End
  112.  
  113. Infeed                                # Enable cutter comp                
  114. G1 G[Side] X[V] Z[H] D[Dcomp] F[FRate]
  115. end
  116.  
  117. Outfeed                               # Disable cutter comp               
  118. G1 G40 X[V] Z[H] F[FRate]
  119. end
  120.  
  121. ToolChange                            # Secondary tool changes            
  122. M[CoolantOff]
  123. T[LastTool] t0
  124. G50 x[ToolH] Z[ToolV]
  125. G0 T[Tool] t[Tool] M42
  126. G[SpeedType] S[Speed] M[Direct]
  127. X[V] Z[H] M[Cool]
  128. End
  129.  
  130. EndCode                               # End of the program                
  131. G0 x[ToolV] Z[ToolH] M[CoolantOff]
  132. T[Tool] t0 M5
  133. M2
  134. End
  135.  
  136.   #LineCode
  137.   #G1 X[V] Z[H] F[Frate]
  138.   #End
  139.  
  140.   #RapidCode
  141.   #G0 X[V] Z[H]
  142.   #End
  143.  
  144.   #CcwCode
  145.   #G3 X[V] Z[H] R[ArcRad]
  146.   #End
  147.  
  148.   #CwCode
  149.   #G2 X[V] Z[H] R[ArcRad]
  150.   #End
  151.  
  152.   #Tap
  153.   #G78 Z[H] F[FRate]
  154.   #end cancel
  155.  
  156.   #LTap
  157.   #G78 Z[H] F[FRate]
  158.   #end cancel
  159.  
  160.   #Custom1
  161.   #End
  162.  
  163.   #Custom2
  164.   #End
  165.  
  166.   #Custom3
  167.   #End
  168.  
  169.   #Upon Turret
  170.   #M13
  171.   #End
  172.  
  173. Replace " t" with ""
  174.